<!--create by 郭晓萌 on 2017.10.23-->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
>
<head th:include="head :: head">
    <link rel="import" href="../head.html"/>
</head>
<body class="nav-md">
<div class="container body">
    <div class="main_container ">
        <!--左树-->
        <div id="letree1" class="col-md-3 left_col" th:replace="letree :: letree"></div>
        <!--头部-->
        <div class="top_nav" th:include="header :: top"></div>
        <!--内容-->
        <div class="right_col fullscreenBox" role="main"></div>
    </div>
</div>
<footer th:include="head :: footer"></footer>
<script type="text/javascript" th:inline="javascript">

    /*<![CDATA[*/

    $(function () {//默认加载数据的table--(role_list)
        $.goTo(/*[[@{toRoleList}]]*/"./role_list.html");
    });
    function find() {
        var findForm = $("#findForm").serialize();
        $.goTo("toRoleList",findForm);
    }
    function insertTo() {
        $.goTo(/*[[@{toRoleInsert}]]*/"./role_insert.html");
    }

    function updateTo(obj) {
        /*[+
         var roleId = $(obj).attr("id");
         $.goTo("update/"+roleId);
         +]*/
    }

    function toMenu(obj) {
        /*[+
         var roleId = $(obj).attr("id");
         $.goTo("toMenu/"+roleId);
         +]*/
    }

    function deleteRole(obj) {
         var roleId = $(obj).attr("id");
         $.MsgBox.Confirm("提示", "执行删除后将无法恢复，确定继续吗？", function () {
            $.post("/role/deleteRole", {"roleId": roleId}, function (date) {
                if(date=="0") {
                    $.MsgBox.Alert("提示", "删除成功");
                    find();
                }
             });
         });
    }

    function up(number) {//分页跳转，上一页
        /*[+
         var findForm = $("#findForm").serialize();
         var number = parseInt(number);
         $.goTo("toRoleList?page="+number,findForm);
         +]*/
    }

    function next(number) {//分页跳转，下一页
        /*[+
         var findForm = $("#findForm").serialize();
         var number = parseInt(number) + 2;
         $.goTo("toRoleList?page="+number,findForm);
         +]*/
    }
    function pageTo(page) {
        /*[+
         var number = page;
         var findForm = $("#findForm").serialize();
         $.goTo("toRoleList?page=" + number,findForm);
         +]*/

    }
    /*]]>*/
</script>

</body>
</html>
